package com.zys.exercise;

import java.util.Scanner;

public class text2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请依次输入，价格，月份，类型");
        double price= sc.nextDouble();
        int month = sc.nextInt();
        int type = sc.nextInt();

        price=Price(price,month,type);
        System.out.println(price);
    }
//type里1表示头等舱，0表示经济舱
    public static double Price(double price,int month,int type){
        switch(month){

            case 5,6,7,8,9,10:{
                if(type==1)
                return price = price*0.9;
                else{
                    return price = price*0.85;
                }
            }
            case 11,12,1,2,3,4:{
                if(type==1)
                    return price = price*0.7;
                else{
                    return price = price*0.65;
                }
            }



        }
        return 0;

    }

}
